<?php

(defined('BASEPATH')) OR exit('No direct script access allowed');

class Admin_Controller extends MY_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->library('session');
        if (!$this->phpsession->get('is_logged_in'))
            redirect('auth');
        $header['page'] = 'admin/header';
        $footer['page'] = "admin/footer";
        $this->_data['footer'] = $footer;
        $this->_data['header'] = $header;
        $this->_data['error'] = FALSE;
        $this->_data['title']=__('admin_panel');
        $lang = $this->session->userdata('lang') == 'fr' ? 'french' : 'english';
        $this->config->set_item('language', $lang);
        $this->lang->load('ots_backend', $lang);
    }

    function before_render() {
        
    }

}
